<template>
	<view class="container" >
		<view class="status_bar">
			<view style="margin-left: 3%;" @tap="goBack()"><u-icon name="arrow-leftward" size='24' /></view>
			<view style="margin-left: -50upx; font-weight: bold;">修改密码-密保验证</view>
			<view></view>
			</u-icon>
		</view>


		<view class="shop-box">
			<view class="num-box" @tap="handlePick1()">
				<view>请选择密保问题</view>
				<view class="select-btn"></view>
			</view>
			<view class="num-box" style="color: #a2a3a5;">
				<u--input placeholder="请输入密保答案" border="none" v-model="value" @change="change"></u--input>
			</view>
			<view class="num-box">
				<view>请选择密保问题</view>
				<view class="select-btn"></view>
			</view>
			<view class="num-box" style="color: #a2a3a5;">
				<u--input placeholder="请输入密保答案" border="none" v-model="value" @change="change"></u--input>
			</view>
			<view class="num-box">
				<view>请选择密保问题</view>
				<view class="select-btn"></view>
			</view>
			<view class="num-box" style="color: #a2a3a5;">
				<u--input placeholder="请输入密保答案" border="none" v-model="value" @change="change"></u--input>
			</view>
			<view class="num-box" style="color: #a2a3a5;">
				<u--input placeholder="新的密码" border="none" v-model="value" @change="change"
					:password="passwordShow"></u--input>
				<image v-if="eyeShow==true" src="../../../static/image/icon-eye@3x.png" class="eye" @tap="oneye()">
				</image>
				<image v-else src="../../../static/image/icon-eye-o@3x.png" class="eye-o" @tap="oneyeOpen()"></image>
			</view>
			<!-- <view class="verify-box">
				<view style="color: #9a9b9d;">请输入验证码</view>
				<view style="color: #1c6cc5;">获取验证码</view>
			</view> -->
			<view style="margin-top: 24upx;">
				<view style="padding:20upx 0 20upx 0;">密码规则</view>
				<view class="roule-text">最少8位字符</view>
				<view class="roule-text">最少包含1个大写字母</view>
				<view class="roule-text">最少包含1个小写字母</view>
				<view class="roule-text">最少包含1个数字</view>
				<view style="color: #7ead8b; font-weight: 300; font-size: 28upx;">不能包含空格和换行</view>
			</view>
		</view>
		<view class="btn-box"><u-button class="custom-style" type="primary" text="确定" color="#b4b4b4"></u-button></view>
		<u-picker :show="show1" :columns="columns" keyName="label" @cancel="cancel1" @confirm="confirm1"
			cancelColor="#cb6781"></u-picker>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				startX: 0, // 触摸开始的X坐标
				endX: 0, // 触摸结束的X坐标
				threshold: 50, // 设置滑动多少距离后触发返回
				value1: '',
				show1: false,
				eyeShow: true,
				passwordShow: true,
				columns: [
					[{
						label: '你初恋的姓名是？',
						id: 2021
					}, {
						label: '你小学老师的姓名是',
						id: 804
					}, {
						label: '你中学老师的姓名是',
						id: 802
					}]
				],
			}
		},
		onLoad() {

		},
		methods: {
			goBack() {
				uni.navigateBack({
					delta: 1
				});
			},
			
			
			handlePick1() {
				this.show1 = true
			},
			cancel1() {
				this.show1 = false
			},
			confirm1(e) {
				console.log('confirm', e)
				this.show1 = false
			},
			oneye() {
				this.passwordShow = false
				this.eyeShow = false
			},
			oneyeOpen() {
				this.passwordShow = true
				this.eyeShow = true
			}

		}
	}
</script>

<style lang="scss" scoped>
	.container {
		width: 100%;
		height: 100%;
	}

	.status_bar {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 50upx;
	}

	.status_bar,
	.head {
		background-color: #fff;
		height: 160upx;

		.face {
			width: 160upx;
			height: 160upx;
			border-radius: 10upx;
		}

		.info-name {
			font-size: 40upx;
			font-weight: bold;
		}

		.info-num {
			// width: 56upx;
			padding: 2upx 30upx;
			background: #f0f4f7;
			border-radius: 30upx;
			margin-top: 21upx;
		}

		.copybtns {
			color: #4457a4;
			margin-top: 21upx;
		}
	}


	.shop-box {
		width: 92%;
		margin-left: 4%;
		margin-top: 20upx;


		.title-box {
			font-weight: bold;
			margin-top: 120upx;
			font-size: 50upx;
			color: #323232;
		}

		.num-box {
			color: #313234;
			background: #f8f9fb;
			height: 100upx;
			border-radius: 30upx;
			line-height: 100upx;
			padding-left: 20upx;
			margin-top: 30upx;
			display: flex;
			justify-content: space-between;
			font-weight: 300;

			.select-btn {
				width: 0;
				height: 0;
				border-left: 14upx solid transparent;
				border-right: 14upx solid transparent;
				border-bottom: 12upx solid #000;
				transform: rotate(180deg);
				margin-top: 40upx;
				margin-right: 36upx;
			}

			.eye {
				width: 40upx;
				height: 20upx;
				padding: 45upx 40upx 0 0;
			}

			.eye-o {
				width: 40upx;
				height: 26upx;
				padding: 40upx 40upx 0 0;
			}
		}

		.verify-box {
			color: #323335;
			background: #f8f9fb;
			height: 100upx;
			border-radius: 30upx;
			line-height: 100upx;
			padding: 0 20upx;
			margin-top: 30upx;
			display: flex;
			justify-content: space-between;
		}

		.roule-text {
			color: #cb6781;
			font-weight: 300;
			font-size: 28upx;
		}

	}

	.btn-box {
		width: 92%;
		margin-left: 4%;
		margin-top: 125upx;

		::v-deep.u-button__text[data-v-3bf2dba7] {
			color: #fdfdfd;
		}

		::v-deep.u-button--square[data-v-3bf2dba7] {
			border-radius: 18upx;
		}

	}
</style>